Integrand size = 23, antiderivative size = 135 \[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=-\frac {4 a b \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 \left (a^2+3 b^2\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {4 a b \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a^2 \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3317, 3873, 3853, 3856, 2719, 4131, 2720} \[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\frac {2 \left (a^2+3 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a^2 \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {4 a b \sin (c+d x) \sqrt {\sec (c+d x)}}{d}-\frac {4 a b \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3317
Rule 3853
Rule 3856
Rule 3873
Rule 4131
Rubi steps \begin{align*} \text {integral}& = \int \sqrt {\sec (c+d x)} (b+a \sec (c+d x))^2 \, dx \\ & = (2 a b) \int \sec ^{\frac {3}{2}}(c+d x) \, dx+\int \sqrt {\sec (c+d x)} \left (b^2+a^2 \sec ^2(c+d x)\right ) \, dx \\ & = \frac {4 a b \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a^2 \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}-(2 a b) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (a^2+3 b^2\right ) \int \sqrt {\sec (c+d x)} \, dx \\ & = \frac {4 a b \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a^2 \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}-\left (2 a b \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{3} \left (\left (a^2+3 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = -\frac {4 a b \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 \left (a^2+3 b^2\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {4 a b \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a^2 \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d} \\ \end{align*}
Time = 0.49 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.69 \[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\frac {2 \sec ^{\frac {3}{2}}(c+d x) \left (-6 a b \cos ^{\frac {3}{2}}(c+d x) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+\left (a^2+3 b^2\right ) \cos ^{\frac {3}{2}}(c+d x) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+a (a+6 b \cos (c+d x)) \sin (c+d x)\right )}{3 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(512\) vs. \(2(171)=342\).
Time = 106.69 (sec) , antiderivative size = 513, normalized size of antiderivative = 3.80
method | result | size |
default | \(-\frac {2 \sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (24 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -2 F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}-6 F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}-12 E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}-12 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b +a^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 b^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+6 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b \right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{3 \left (4 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(513\) |
parts | \(-\frac {2 a^{2} \left (-2 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )}^{\frac {3}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) d}-\frac {2 b^{2} \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}-\frac {4 a b \left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(535\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.41 \[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\frac {-6 i \, \sqrt {2} a b \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 6 i \, \sqrt {2} a b \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + \sqrt {2} {\left (-i \, a^{2} - 3 i \, b^{2}\right )} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (i \, a^{2} + 3 i \, b^{2}\right )} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + \frac {2 \, {\left (6 \, a b \cos \left (d x + c\right ) + a^{2}\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{3 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
Timed out. \[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\int { {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {5}{2}} \,d x } \]
[In]
[Out]
\[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\int { {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {5}{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int (a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x) \, dx=\int {\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2 \,d x \]
[In]
[Out]